<template>
  <div class="">
    <div class="header">
      <span>todolist</span>
      <input type="text" v-model="title" @keydown.enter="add" />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: "",
    };
  },
  mounted() {},
  methods: {
    add() {
      this.$emit("add", this.title);
    },
  },
  components: {},
};
</script>

<style lang="scss" scoped>
.header {
  height: 80px;
  background: rgb(65, 63, 63);
  display: flex;
  padding: 0 300px;
  justify-content: space-around;
  align-items: center;
  span {
    font-size: 30px;
    color: #fff;
  }
  input {
    width: 500px;
    height: 50px;
    border: none;
    border-radius: 10px;
  }
}
</style>
